//package com.example.demo;
//
//import java.io.UnsupportedEncodingException;
//import java.util.Base64;
//
///**
// * @author Miracle Luna
// * @version 1.0
// * @date 2019/7/3 18:55
// */
//public class Base64Converter {
//
//    final static Base64.Encoder encoder = Base64.getEncoder();
//    final static Base64.Decoder decoder = Base64.getDecoder();
//
//    /**
//     * 给字符串加密
//     * @param text
//     * @return
//     */
//    public static String encode(String text) {
//        byte[] textByte = new byte[0];
//        try {
//            textByte = text.getBytes("UTF-8");
//        } catch (UnsupportedEncodingException e) {
//            e.printStackTrace();
//        }
//        String encodedText = encoder.encodeToString(textByte);
//        return encodedText;
//    }
//
//    /**
//     * 将加密后的字符串进行解密
//     * @param encodedText
//     * @return
//     */
//    public static String decode(String encodedText) {
//        String text = null;
//        try {
//            text = new String(decoder.decode(encodedText), "UTF-8");
//        } catch (UnsupportedEncodingException e) {
//            e.printStackTrace();
//        }
//        return text;
//    }
//
//    public static void main(String[] args) throws UnsupportedEncodingException {
//
//        String username ="{"creatives":[{"ad_id":"1657881543395368","ad_logo":1,"ad_shop":0,"app":{"app_name":"抖音极速版","app_size":21060826,"appleid":"0","comment_num":5059,"download_url":"https://s.toutiao.com/oqwmF/","package_name":"com.ss.android.ugc.aweme.lite","score":3},"appstore_jump_type":0,"button_text":"点击下载","click_url":[],"creative_type":6,"description":"每天看20分钟视频，饭钱就有了，不信你来试试！","download_conf":{"auto_control":0,"auto_open":1,"download_mode":0,"download_type":1,"if_suspend_download":0,"support_multiple":0},"ext":"{\"app_name\": \"\\u89c6\\u9891\\u89c2\\u770b\", \"package_name\": \"cc.gara.fish.dog\", \"dynamic_ptpl_id\": 87, \"rit\": 945018360, \"orit\": 900000000, \"ad_type\": 1, \"height\": 1920, \"pack_time\": 1581587734.393191, \"os_version\": \"7.0\", \"pricing\": 9, \"device_type\": \"SM-G9500\", \"promotion_type\": 0, \"is_sdk\": true, \"uid\": 47357475474, \"uuid\": \"\", \"oaid\": \"77abdcfe-6e51-49f5-a783-8812f51fe89d\", \"dynamic_creative\": \"{\\\"color\\\": \\\"#e62e81\\\"}\", \"creative_id\": 1657881543395368, \"version_code\": \"4.5.1\", \"vid\": \"1317487,1212151,1405125,1452613,1169598,1468405,1380630,849519,1378609,1176730,1469542,1314279,1157027,1476311,1476348,1478199,1191815,1476993,1439777,1471533,1458343,1428748,1465907,1405121,1473315,1340274,1277535,1242466,1356091,1310926,1401436,1453515,1463093,1473901\", \"uuid_md5\": \"\", \"width\": 1080, \"template_rate\": 0, \"src_type\": \"app\", \"img_gen_type\": 0, \"client_ip\": \"140.243.21.91\", \"ad_id\": 1657880458118163, \"convert_id\": 1651801004558348, \"img_md5\": \"\", \"ad_price\": \"XkJm4wADrCpeQmbjAAOsKuacS0wPn6J8ngfXDA\", \"app_id\": \"5039810\", \"source_type\": 1, \"mac\": \"A0:CC:2B:C5:86:93\", \"imei\": \"\", \"ug_creative_id\": \"\", \"device_id\": 47357475474, \"landing_type\": 3, \"language\": \"golang\", \"cid\": 1657881543395368, \"ut\": 14, \"dynamic_tpl_id\": 94501836000008, \"interaction_type\": 4, \"open_udid\": \"\", \"pos\": 2, \"req_id\": \"1f8d9a40-fdc7-4ec8-a23b-891a54fc35bau6037\", \"is_dsp_ad\": false, \"ad_slot_type\": 5, \"os_type\": null, \"os\": \"android\", \"template_id\": 0}","filter_words":[{"id":"4:2","is_selected":false,"name":"看过了"},{"id":"4:1","is_selected":false,"name":"不感兴趣"},{"id":"4:3","is_selected":false,"name":"广告太多了"},{"id":"6:0","is_selected":false,"name":"举报垃圾内容","options":[{"id":"6:1","is_selected":false,"name":"低俗色情"},{"id":"6:2","is_selected":false,"name":"虚假欺诈"},{"id":"6:3","is_selected":false,"name":"标题夸张"},{"id":"6:4","is_selected":false,"name":"疑似抄袭"}]}],"icon":{"height":100,"url":"http://p3-tt.byteimg.com/img/web.business.image/202001165d0d861d915cd258444eaec3~100x100.image","width":100},"image":[{"height":720,"url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/2ee4c0005bd64125afe73~noop.webp","width":1280}],"image_mode":5,"in_app":true,"interaction_type":4,"intercept_flag":0,"is_playable":false,"play_bar_show_time":-1,"play_bar_style":0,"screenshot":false,"show_url":["https://ug.snssdk.com/ad/impression/toutiao/?action_type\u003dview\u0026surl_token\u003dUKTA\u0026ad_id\u003d1657880458118163\u0026ad_name\u003dUKTA-toutiaodsp-new-dylite3-%E6%8A%96%E9%9F%B3lite-and-%E5%8C%851-%E8%81%94%E7%9B%9F-%E5%8E%9F%E7%94%9F%E6%A8%AA%E7%89%88-BKY-88-020706\u0026campaign_id\u003d1654225162127371\u0026creative_id\u003d1657881543395368\u0026csite\u003d900000000\u0026ctype\u003d5\u0026mac\u003d4eabc31081d88f25a98af7c0b0ed9829\u0026mac1\u003d\u0026ua\u003dDalvik%2F2.1.0+%28Linux%3B+U%3B+Android+7.0%3B+zh-CN%3B+SM-G9500+Build%2FNRD90M%29\u0026idfa\u003d\u0026imei_md5\u003d\u0026android_id_md5\u003d\u0026os\u003d0\u0026ip\u003d140.243.21.91\u0026event_time_ts\u003d1581587734000\u0026convert_id\u003d\u0026callback_param\u003dCJOIpf7V-vgCEKiQ5YPa-vgCGJL15rWwASCS9ea1sAEojJD3oN7J9wIwDjj4q8_CA0IpMWY4ZDlhNDAtZmRjNy00ZWM4LWEyM2ItODkxYTU0ZmMzNWJhdTYwMzdIgNKTrQNQAA\u003d\u003d\u0026oaid\u003d77abdcfe-6e51-49f5-a783-8812f51fe89d\u0026union_site\u003d2034781188"],"target_url":"https://www.chengzijianzhan.com/tetris/page/6765781020890365959/?ad_id\u003d1657880458118163\u0026_toutiao_params\u003d%7B%22cid%22%3A1657881543395368%2C%22device_id%22%3A47357475474%2C%22log_extra%22%3A%22%7B%5C%22ad_price%5C%22%3A%5C%22XkJm4wADrCpeQmbjAAOsKuacS0wPn6J8ngfXDA%5C%22%2C%5C%22convert_id%5C%22%3A1651801004558348%2C%5C%22orit%5C%22%3A900000000%2C%5C%22req_id%5C%22%3A%5C%221f8d9a40-fdc7-4ec8-a23b-891a54fc35bau6037%5C%22%2C%5C%22rit%5C%22%3A945018360%7D%22%2C%22orit%22%3A900000000%2C%22req_id%22%3A%221f8d9a40-fdc7-4ec8-a23b-891a54fc35bau6037%22%2C%22rit%22%3A945018360%2C%22sign%22%3A%22D41D8CD98F00B204E9800998ECF8427E%22%2C%22uid%22%3A47357475474%2C%22ut%22%3A14%7D","temp_extra_info":"{\"img_gen_type\":0,\"img_md5\":\"\",\"template_id\":0}","template_id":0,"title":"每天看20分钟视频，饭钱就有了，不信你来试试！","union_special":2,"video":{"cover_height":720,"cover_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/2ee4c0005bd64125afe73~noop.jpg","cover_width":1280,"endcard":"https://www.toutiaopage.com/union/endcard/1657881543395368/?rit\u003d945018360\u0026req_id\u003d1f8d9a40-fdc7-4ec8-a23b-891a54fc35bau6037\u0026ad_sdk_version\u003d2.5.3.2\u0026os\u003dandroid\u0026lang\u003dzh\u0026use_nebula\u003d\u0026is_dsp\u003dFalse\u0026style_id\u003d-1\u0026ad_id\u003d1657880458118163\u0026_toutiao_params\u003d%7B%22cid%22%3A1657881543395368%2C%22device_id%22%3A47357475474%2C%22log_extra%22%3A%22%7B%5C%22ad_price%5C%22%3A%5C%22XkJm4wADrCpeQmbjAAOsKuacS0wPn6J8ngfXDA%5C%22%2C%5C%22convert_id%5C%22%3A1651801004558348%2C%5C%22orit%5C%22%3A900000000%2C%5C%22req_id%5C%22%3A%5C%221f8d9a40-fdc7-4ec8-a23b-891a54fc35bau6037%5C%22%2C%5C%22rit%5C%22%3A945018360%7D%22%2C%22orit%22%3A900000000%2C%22req_id%22%3A%221f8d9a40-fdc7-4ec8-a23b-891a54fc35bau6037%22%2C%22rit%22%3A945018360%2C%22sign%22%3A%22D41D8CD98F00B204E9800998ECF8427E%22%2C%22uid%22%3A47357475474%2C%22ut%22%3A14%7D","file_hash":"b7ceb46754f815cc67c23c9f028537cb","resolution":"1280x720","size":12345200,"video_duration":50.24,"video_url":"http://v3-ad.ixigua.com/b7d4f6e043286ca2360c4f1a00d94fc3/5e452b47/video/tos/cn/tos-cn-ve-51/7fbd1b5315394ba39132f2c2fb6f7f62/toutiao.mp4"}}],"did":47357475474,"processing_time_ms":187,"request_id":"1f8d9a40-fdc7-4ec8-a23b-891a54fc35ba","status_code":20000}"      // String password = "p@sSW0rd";
//
//        // 加密
//        System.out.println("====  [加密后] 用户名/密码  =====");
//        System.out.println(Base64Converter.encode(username));
//      //  System.out.println(Base64Converter.encode(password));
//
//        // 解密
//        System.out.println("\n====  [解密后] 用户名/密码  =====");
//        System.out.println(Base64Converter.decode(Base64Converter.encode(username)));
//        //System.out.println(Base64Converter.decode(Base64Converter.encode(password)));
//    }
//}